package com.qumitech.visualnovel.controller.rest.novel;

import com.alibaba.fastjson.JSONObject;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.beans.factory.annotation.Autowired;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import com.qumitech.visualnovel.model.common.BaseResponse;
import com.qumitech.visualnovel.service.novel.UserFeedbackService;
import com.qumitech.visualnovel.model.dto.UserFeedbackQueryDTO;
import com.qumitech.visualnovel.model.dto.UserFeedbackUpdateDTO;

@RestController
@Api(value = "用户反馈", description = "用户反馈")
public class UserFeedbackRest {
    @Autowired
    private UserFeedbackService userFeedbackService;

    @ApiOperation(value = "用户反馈列表", notes = "用户反馈列表")
    @GetMapping("/api/user/feedback/list")
    public BaseResponse userFeedbackList(UserFeedbackQueryDTO param) {
        return userFeedbackService.userFeedbackList(param);
    }

    @ApiOperation(value = "修改用户反馈", notes = "修改用户反馈")
    @PostMapping("/api/user/feedback/{id}")
    public BaseResponse updateFeedback(@PathVariable(name="id") Long id, @RequestBody UserFeedbackUpdateDTO param) {
        return userFeedbackService.updateUserFeedback(id, param);
    }
}
